<?php
if(!isset($_SESSION)){session_start();};
require_once("core.php");
$PHP_SELF = "index.php";
GETMODULE($_GET[m],$_GET[p]);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo WEB_TITLE; ?></title>
	<link rel='stylesheet' type='text/css' href='css/vtip.css' />
<?php if($_GET['m'] == 'products' && $_GET['p'] == 'bill' || $_GET['p'] == 'print'){?>
    <link rel='stylesheet' type='text/css' href='css/bill-style.css' />
	<link rel='stylesheet' type='text/css' href='css/print.css' media="print" />
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css">

	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js"></script>
	<script type="text/javascript" src="js/jquery.ui.autocomplete.autoSelect.js"></script>
<?php }else{?>
    <link type="text/css" href="css/styles.css" rel="stylesheet" />
    <link type="text/css" href="css/codeponpon-theme/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
    <link type="text/css" href="css/jquery.fancybox-1.3.4.css" media="screen" rel="stylesheet"/>
    <link type="text/css" href="css/table_jui.css" media="screen" rel="stylesheet"/>
    <?php if($_GET['m'] == "stickers" || $_GET['pedit'] == true){?>
    	<link rel="stylesheet" href="css/jwysiwyg/jquery.wysiwyg.css" type="text/css" />
		<link rel="stylesheet" href="css/jwysiwyg/jquery.wysiwyg.modal.css" type="text/css" />
		<link rel="stylesheet" href="css/jwysiwyg/jquery.simplemodal.css" type="text/css" />
	<?php } ?>
    <?php
      if($_GET['p'] == "add_member" || $_GET['p'] == "add_customer" || $_GET['p'] == "add_saler" || $_GET['p'] == "profile"){
    ?>
    <link type="text/css" href="css/cmxform.css" media="screen" rel="stylesheet"/>
    <?php } ?>
    <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="js/jquery.mousewheel-3.0.4.pack.js"></script>
    <script type="text/javascript" src="js/jquery.fancybox-1.3.4.pack.js"></script>
    <script type="text/javascript" src="js/jquery.dataTables.js"></script>
    <script type="text/javascript" src="js/TableTools.js"></script>
    <script type="text/javascript" src="js/ZeroClipboard.js"></script>
    <?php
      if($_GET['p'] == "add_member" || $_GET['p'] == "add_customer" || $_GET['p'] == "add_saler" || $_GET['p'] == "profile"){
    ?>
    <script type="text/javascript" src="js/jquery.validate.js"></script>
    <?php }?>
    <script type="text/javascript" src="js/jquery.jeditable.js"></script>
    <script type="text/javascript" src="js/jquery.ajaxupload.3.5.js"></script>
    <script type="text/javascript" src="js/scripts.js"></script>
<?php }?>
	<script type="text/javascript" src="js/vtip.js"></script>
<?php
	if($_GET['m'] == "stickers" || $_GET['pedit'] == true){
?>
    <script type="text/javascript" src="js/jwysiwyg/jquery.wysiwyg.js"></script>
	<script type="text/javascript" src="js/jwysiwyg/jquery.simplemodal.js"></script>
<?php
	}
?>

</head>

<body>
<?php if($_GET['m'] == 'products' && $_GET['p'] == 'bill' || $_GET['p'] == 'print'){?>
<div id="page-wrap">
<?php include ($MODPATHFILE); ?>
</div>
<?php }else{ ?>
	<div class="wrapper">
    	<?php if(isset($_SESSION['login'])){ ?>
    	<div class="logout">
        	<a href="?m=index&p=logout" style="float:right;">
        		<img src="css/images/delete_48.png" align="ออกจากระบบ" title="ออกจากระบบ" />
            </a>
       	</div>
        <!--<a href="?m=stickers&p=view" style="position:fixed;right:10px;"><img src="css/images/photo.png" width="110" /></a>-->
        <?php } ?>
        
        <?php include ($MODPATHFILE); ?>
    </div>
<?php } ?>
<?php echo base64_decode(system_store());?>
</body>
</html>

